/// 锻炼类型枚举
enum ExerciseCategory {
  /// 户外活动
  outdoor,
  /// 室内活动
  indoor,
  /// 水上运动
  waterSports,
  /// 球类运动
  ballSports,
  /// 格斗运动
  combatSports,
  /// 冬季运动
  winterSports,
  /// 娱乐运动
  recreationalSports,
  /// 其他运动
  otherSports,
}

/// 锻炼模式模型
class ExerciseType {
  /// 运动ID
  final int id;
  
  /// 运动名称
  final String name;
  
  /// 运动图标（表情符号）
  final String icon;
  
  /// 运动分类
  final ExerciseCategory category;
  
  /// 是否支持GPS
  final bool hasGps;
  
  /// 预估卡路里消耗（每分钟）
  final double caloriesPerMinute;
  
  /// 运动描述
  final String description;

  const ExerciseType({
    required this.id,
    required this.name,
    required this.icon,
    required this.category,
    required this.hasGps,
    required this.caloriesPerMinute,
    required this.description,
  });

  /// 获取分类名称
  String getCategoryName() {
    switch (category) {
      case ExerciseCategory.outdoor:
        return '户外活动';
      case ExerciseCategory.indoor:
        return '室内活动';
      case ExerciseCategory.waterSports:
        return '水上运动';
      case ExerciseCategory.ballSports:
        return '球类运动';
      case ExerciseCategory.combatSports:
        return '格斗运动';
      case ExerciseCategory.winterSports:
        return '冬季运动';
      case ExerciseCategory.recreationalSports:
        return '娱乐运动';
      case ExerciseCategory.otherSports:
        return '其他运动';
    }
  }
}
